﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Dialog.Master" AutoEventWireup="true"
    CodeBehind="HtmlToolAccountEdit.aspx.cs" Inherits="NetDon.OA.Portal.HtmlTool.HtmlToolAccountEdit" %>

<%@ Register TagPrefix="uc1" TagName="RequiredMark" Src="~/Controls/RequiredMark.ascx" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
    <NetDon:FormPanel ID="panelCustomInfo" runat="server" CaptionAlign="NotSet" RepeatColumns="1">
        <Items>
            <NetDon:FormItem HeaderText="账号名称">
                <ContentTemplate>
                    <asp:TextBox ID="txtAccountname" runat="server" Text='<%#Bind("Accountname") %>'></asp:TextBox>
                    <uc1:RequiredMark ID="RequiredMark5" runat="server" />
                    <asp:RequiredFieldValidator ID="RequiredFieldValidator6" runat="server" ControlToValidate="txtAccountname"
                        Display="None" ErrorMessage="请输入账号名称" SetFocusOnError="True"></asp:RequiredFieldValidator>
                    <asp:CheckBox runat="server" ID="ckbIsDefault" Enabled="False" Checked='<%#Eval("Isdefault") != null && Convert.ToBoolean(Eval("Isdefault")) %>' Text="是否默认" />
                </ContentTemplate>
            </NetDon:FormItem>
            <NetDon:FormItem HeaderText="站点" ColumnSpan="2">
                <ContentTemplate>
                    <asp:DropDownList ID="ddleBaysite" runat="server" CausesValidation="True" DataSourceID="EnumDataSource1" 
                        DataTextField="Name" DataValueField="Name">
                    </asp:DropDownList>
                     <uc1:RequiredMark ID="RequiredMark1" runat="server" />
                    <asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" ControlToValidate="ddleBaysite"
                        Display="None" ErrorMessage="请选择站点" SetFocusOnError="True"></asp:RequiredFieldValidator>

                    <NetDon:EnumDataSource ID="EnumDataSource1" runat="server" EmptyItemType="All" TypeName="NetDon.eBoss.Portal.Common.eBaySites">
                    </NetDon:EnumDataSource>
                </ContentTemplate>
            </NetDon:FormItem>
            <NetDon:FormItem HeaderText="商品描述来源" ColumnSpan="2">
                <ContentTemplate>
                    <asp:DropDownList ID="ddlAccountFrom" runat="server" DataSourceID="ObjectDataSourceCustomers"
                        DataTextField="Accountname" DataValueField="Id" AppendDataBoundItems="true">
                    </asp:DropDownList>
                    <asp:ObjectDataSource ID="ObjectDataSourceCustomers" runat="server" OldValuesParameterFormatString="original_{0}"
                        SelectMethod="RetrieveHtmltoolAccounts" TypeName="NetDon.eBoss.Portal.HtmlTool.HtmlToolDataSource">
                    </asp:ObjectDataSource>
                </ContentTemplate>
            </NetDon:FormItem>
            <NetDon:FormItem HeaderText="Html模版选择" ColumnSpan="2">
                <ContentTemplate>
                    <NetDon:GridView ID="gridCustomerInfoList" runat="server" AutoGenerateColumns="False"
                        AllowSorting="true" OnRowDataBound="gridCustomerInfoList_RowDataBound">
                        <Columns>
                            <NetDon:BoundField HeaderText="HTMLTOOL分类" DataField="Category" >
                            </NetDon:BoundField>
                            <NetDon:TemplateField HeaderText="Html模版" ItemStyle-Width="80px">
                                <ItemTemplate>
                                    <asp:DropDownList ID="ddlTemplate" DataSourceID="ObjectDataSourceTemplate" AppendDataBoundItems="True"
                                        runat="server" DataTextField="Name" DataValueField="Id" >
                                    </asp:DropDownList>
                                    <asp:ObjectDataSource ID="ObjectDataSourceTemplate" runat="server" OldValuesParameterFormatString="original_{0}"
                                        SelectMethod="RetrieveHtmlTemplate" TypeName="NetDon.eBoss.Portal.HtmlTool.HtmlToolDataSource">
                                    </asp:ObjectDataSource>
                                </ItemTemplate>
                            </NetDon:TemplateField>
                        </Columns>
                    </NetDon:GridView>
                </ContentTemplate>
            </NetDon:FormItem>
        </Items>
    </NetDon:FormPanel>
    <div style="padding-top: 10px">
        <center>
            <asp:Button ID="btnSave" runat="server" Text="保存" OnClick="btnSave_Click"></asp:Button>
            <asp:Button ID="btnSaveTemplate" runat="server" Text="复制账号" OnClick="btnSaveTemplate_Click"></asp:Button>
            <asp:Button ID="btnReturn" runat="server" Text="退出" CausesValidation="false"></asp:Button>
            <NetDon:ValidationSummary ID="ValidationSummary2" runat="server" ShowMessageBox="true"
                ShowSummary="false" />
        </center>
    </div>
</asp:Content>
